package com.RunAndHappy.q779178.server.mapper;

import com.RunAndHappy.q779178.pojo.entity.PhoneUser;
import com.RunAndHappy.q779178.pojo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into user (id,username,pwd,status,email,type,location,classwork,phone,classid,aboutme) values (#{id},#{username},#{pwd},#{status},#{email},#{type},#{location},#{classwork},#{phone},#{classid},#{aboutme})")
    public int registResult(int id,String username,String pwd,String status,String email,String type,String location,String classwork,String phone,int classid,String aboutme);
    @Select("select * from user where username = #{username} and pwd = #{password}")
    public User loginResult(String username,String password);

    @Select("select * from user where username = #{username} ")
    public String findExResult(String username);
}
